Option Explicit
Sub Q_Sample052()
    ']wޥζMicrosoft VBScript Regular Expressions 5.5
    Dim myStr      As String
    Dim myPtn      As String
    Dim myMatchClc As VBScript_RegExp_55.MatchCollection
    Dim myMatch    As VBScript_RegExp_55.Match
    myPtn = "www\.[\w\.]+tw"                            'w˦
    'wjMH
    myStr = "DrMaster Publishing}http://www.drmaster.com.twC"
    Set myMatchClc = RegExpMatch(myPtn, myStr)
    For Each myMatch In myMatchClc
        Debug.Print myMatch.FirstIndex, myMatch.Value
    Next
    Set myMatchClc = Nothing                            '
    Set myMatch = Nothing
End Sub
Function RegExpMatch(myPtn As String, _
             myStr As String) As VBScript_RegExp_55.MatchCollection
    ']wޥζMicrosoft VBScript Regular Expressions 5.5
    Dim myRegExp As VBScript_RegExp_55.RegExp
    Set myRegExp = New VBScript_RegExp_55.RegExp
    With myRegExp
        .Pattern = myPtn                        'w˦
        .IgnoreCase = False                     'Ϥjpgr
        .Global = True                          'jMӦr

        Set RegExpMatch = .Execute(myStr)
    End With
    Set myRegExp = Nothing                              '
End Function
